/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 组件[SysComponentDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("组件DTO")
public class SysComponentDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @JsonProperty("id")
    @JSONField(name = "id")
    @ApiModelProperty(value = "标识", position = 0)
    private String id;

    /**
     * 代码名
     */
    @JsonProperty("code_name")
    @JSONField(name = "code_name")
    @ApiModelProperty(value = "代码名", position = 1)
    private String codeName;

    /**
     * 显示名
     */
    @JsonProperty("display_name")
    @JSONField(name = "display_name")
    @ApiModelProperty(value = "显示名", position = 2)
    private String displayName;

    /**
     * 组件类型
     */
    @JsonProperty("component_type")
    @JSONField(name = "component_type")
    @ApiModelProperty(value = "组件类型", position = 3)
    private String componentType;

    /**
     * 上级组件标识
     */
    @JsonProperty("parent_id")
    @JSONField(name = "parent_id")
    @ApiModelProperty(value = "上级组件标识", position = 4)
    private String parentId;

    /**
     * 路由
     */
    @JsonProperty("router_path")
    @JSONField(name = "router_path")
    @ApiModelProperty(value = "路由", position = 5)
    private String routerPath;

    /**
     * 排序
     */
    @JsonProperty("sort")
    @JSONField(name = "sort")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "排序", position = 6)
    private Long sort;

    /**
     * 描述
     */
    @JsonProperty("description")
    @JSONField(name = "description")
    @ApiModelProperty(value = "描述", position = 7)
    private String description;

    /**
     * 下级组件
     */
    @JsonProperty("children")
    @JSONField(name = "children")
    @ApiModelProperty(value = "下级组件", position = 8)
    private List<SysComponentDTO> children;

    /**
     * 接口
     */
    @JsonProperty("apis")
    @JSONField(name = "apis")
    @ApiModelProperty(value = "接口", position = 9)
    private List<SysComponentApiDTO> apis;


    /**
     * 设置 [代码名]
     */
    public SysComponentDTO setCodeName(String codeName) {
        this.codeName = codeName;
        this.modify("code_name", codeName);
        return this;
    }

    /**
     * 设置 [显示名]
     */
    public SysComponentDTO setDisplayName(String displayName) {
        this.displayName = displayName;
        this.modify("display_name", displayName);
        return this;
    }

    /**
     * 设置 [组件类型]
     */
    public SysComponentDTO setComponentType(String componentType) {
        this.componentType = componentType;
        this.modify("component_type", componentType);
        return this;
    }

    /**
     * 设置 [上级组件标识]
     */
    public SysComponentDTO setParentId(String parentId) {
        this.parentId = parentId;
        this.modify("parent_id", parentId);
        return this;
    }

    /**
     * 设置 [路由]
     */
    public SysComponentDTO setRouterPath(String routerPath) {
        this.routerPath = routerPath;
        this.modify("router_path", routerPath);
        return this;
    }

    /**
     * 设置 [排序]
     */
    public SysComponentDTO setSort(Long sort) {
        this.sort = sort;
        this.modify("sort", sort);
        return this;
    }

    /**
     * 设置 [描述]
     */
    public SysComponentDTO setDescription(String description) {
        this.description = description;
        this.modify("description", description);
        return this;
    }

    /**
     * 设置 [下级组件]
     */
    public SysComponentDTO setChildren(List<SysComponentDTO> children) {
        this.children = children;
        this.modify("children", children);
        return this;
    }

    /**
     * 设置 [接口]
     */
    public SysComponentDTO setApis(List<SysComponentApiDTO> apis) {
        this.apis = apis;
        this.modify("apis", apis);
        return this;
    }


}
